*************************************************************************************************
*																								*
*						Flexible Wages, Bargaining, and The Gender Gap							*
*						Barbara Biasi and Heather Sarsons										*
*						Prepare data for Honest DID Approach (Rambachan and Roth 2020)			*
*																								*
*************************************************************************************************

clear all
set more off
set matsize 11000
set maxvar 32000


global user = 2 // 1 = Heather, 2 = Barbara

if $user == 1 {
cd "/Users/sarsons/Dropbox/wisconsin_women/data"
global tab = "/Users/sarsons/Dropbox/wisconsin_women/draft/tables"
global out = "/Users/sarsons/Dropbox/wisconsin_women/out"
global RA = "/Users/sarsons/Dropbox/wisconsin_women/do/calvin"
}
if $user == 2 {
cd "~/Dropbox/Research/wisconsin_women/data"
global tab = "~/Dropbox/Research/wisconsin_women/draft/tables"
global out = "~/Dropbox/Research/wisconsin_women/out"
global RA = "~/Dropbox/Research/wisconsin_women/do/calvin"
}
if $user == 3 {
cd "~/wisconsin_women/data"
global tab = "~/wisconsin_women/draft/tables"
global out = "~/wisconsin_women/out"
global RA = "~/wisconsin_women/do/calvin"
global do = "~/wisconsin_women/do"
}
* Yale colors
global yaleblue = "0 53 107"
global ylb = "40 109 192"
global yo = "189 83 25"
global ylight = "217 233 242"
global graph = "xlabel(,grid glp(dot) glc(gs10) tlc(gs10)) ylabel(,grid glp(dot) glc(gs10) tlc(gs10)) plotregion(lp(blank))"
global graphbar = "ylabel(,grid glp(dot) glc(gs10) tlc(gs10)) plotregion(lp(blank))"


* Load & prepare data
do $do/QJE_R1/preamble_revision.do
keep if timex > -6
replace logsalary = logsalary * 100
keep id district_code year logsalary totalexp master phd high math timex Timex postexp postext femx_* female master phd high math expire extension
sort id year
save honestdid.dta, replace

